// @include "../../scripts/spket.js"

$(function() {
	$("#login-form").submit(function(event) {
		event.preventDefault();

		var request = {
			action: "auth.login",
			params: {
				name: $("#name").val(),
				password: $("#password").val()
			}
		};

		panda.post(request, function(data){
			if (data) {
				location.reload();
			} else {
				$("#error").html("Login Failed.");
			}
		});
	});
});
